﻿using IotContract.Models.Webs;
using ProtoBuf;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IotContract.Dtos.Servers.Pushs;
[ProtoContract]
[ProtoInclude(1, typeof(PushTagWeb))]
public class PushEquipTag:ICloneable
{
    /// <summary>
    /// 点位
    /// </summary>
    [ProtoMember(6)]
    public string TagNum { get; set; }
    /// <summary>
    /// 点位Id
    /// </summary>
    [ProtoMember(5)]
    public long Id { get; set; }
    /// <summary>
    /// 值
    /// </summary>
    [ProtoMember(10)]
    public string Value { get; set; }
    /// <summary>
    /// 旧值
    /// </summary>
    [ProtoMember(2)]
    public string OldValue { get; set; }
    /// <summary>
    /// 读取时间
    /// </summary>
    [ProtoMember(3)]
    public DateTime? ReadTime { get; set; }
    /// <summary>
    /// 值变化时间
    /// </summary>
    [ProtoMember(4)]
    public DateTime? ReadChangeTime { get; set; }

    /// <summary>
    /// 编号属性
    /// </summary>
    [ProtoMember(7)]
    public string TagProperty { get; set; }
    /// <summary>
    /// 设备Id
    /// </summary>
    [ProtoMember(8)]
    public long EquipInfoId { get; set; }
    /// <summary>
    /// Mqtt发布标识
    /// </summary>
    [ProtoMember(9)]
    public bool IsMqttPublish { get; set; }

    public object Clone()
    {
        return MemberwiseClone();
    }
}
